import java.util.Scanner;

public class Main1169 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n= sc.nextInt();
        int[] a=new int[n];
        int max=0;
        if (a[0]>a[1])
            max=a[0];
            else max=a[1];
            if(a[2]>max)
                max=a[2];
            if(a[3]>max)
                max=a[3];
            if(a[4]>max)
                max=a[4];
            if(a[5]>max)
             max=a[5];
            if(a[6]>max)
                max=a[6];
            if(a[7]>max)
                max=a[7];
            if(a[8]>max)
                max=a[8];
            if(a[9]>max)
                max=a[9];
        System.out.println(max);
        }
    }

